home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_008 / src / hack.termcap.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  982b  |  81 lines

  1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
  2.  
  3. #include <stdio.h>
  4. #include "config.h"   /* for ROWNO and COLNO */
  5.  
  6. #define HEIGHT 8
  7. #define WIDTH  8
  8. #define TOP    16
  9. #define LEFT   3
  10.  
  11. startup()
  12. {
  13. }
  14.  
  15. /* Cursor movements */
  16. extern xchar curx, cury;
  17.  
  18. curs(x,y)
  19. register int x,y;   /* not xchar: perhaps xchar is unsigned and
  20.             curx-x would be unsigned as well */
  21. {
  22.    if (y == cury && x == curx) return;
  23.    cmov(x,y);
  24. }
  25.  
  26. nocmov(x,y)
  27. {
  28.   cmov(x,y);   /* always go to the requested position */
  29. }
  30.  
  31. cmov(x,y)
  32. register int x,y;
  33. {
  34.    setxy(LEFT+x*WIDTH,TOP+y*HEIGHT);
  35.    cury = y;
  36.    curx = x;
  37. }
  38.  
  39.  
  40. cl_end() {
  41.    weraeol();
  42. }
  43.  
  44. clear_screen() {
  45.    /* printf(CL); */
  46.    home();
  47. }
  48.  
  49. home()
  50. {
  51.    setxy(TOP,LEFT);
  52.    curx = cury = 1;
  53. }
  54.  
  55. standoutbeg()
  56. {
  57.    /* printf(SO); */
  58. }
  59.  
  60. standoutend()
  61. {
  62.    /* printf(SE); */
  63. }
  64.  
  65. backsp()
  66. {
  67.    cmov(curx-1,cury);
  68. }
  69.  
  70. bell()
  71. {
  72.     /* putchar('\007'); */
  73. }
  74.  
  75. delay_output()
  76. {
  77.    /* delay 40 ms, 50 ticks/sec    */
  78.    Delay (2);
  79. }
  80.  
  81.